B13 - Supermarket 2
提出
code: python
n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
# print(a)
# 最高到達点 3,3,2,2,1,1,1
for i, v in enumerate(a):
res = 0
while res <= k:
解答
code: python
n, k = map(int, input().split())
a = list(map(int, input().split()))
for i in range(1, n+1):
# print(s)
# . . . .
# . .
# .
# .
# .
# . .
# . .
for i in range(n):
if i == 0:
else:
while ri < n-1 and s[(ri+1)+1] - si <= k: # print(r)
ans = 0
for i in range(n):
print(ans)